package com.zcsy.manage.distribution.service.system.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcsy.manage.model.system.User;
import com.zcsy.manage.persistence.system.UserDao;
import com.zcsy.manage.service.system.impl.SystemComService;
import com.zcsy.manage.distribution.service.system.IDUserService;

/**
 * 
 * @Title:DUserServiceImpl
 * @Package：  com.zcsy.manage.distribution.service.system.impl
 * @Description:用户类实现类 
 * @author wangj
 * @date 2016年6月17日上午11:05:36
 * @version 1.0
 * @see JDK1.7.0_67
 * @Copyright: 2016 武汉恒数利通技术有限公司 All rights reserved.
 */
@Service
public class DUserServiceImpl extends SystemComService implements IDUserService {

	@Autowired
	private UserDao userDao;

	@Override
	public User userLogin(User user) {


		return userDao.userLogin(user);
	}

	@Override
	public int updateInformation(User user) {	
		return userDao.updateInformation(user);
	}

	@Override
	public int changePwd(User user) {
		return userDao.changePwd(user);
	}

	@Override
	public User selectByPrimaryKey(String id) {
		return userDao.selectByPrimaryKey(id);
	}

	@Override
	public User selectByLoginName(String name) {
		return userDao.selectByLoginName(name);
	}

	@Override
	public User selectByPhone(String phone) {
		return userDao.selectByPhone(phone);
	}

	@Override
	public List<Map<String, Object>> selectByrole(List<String> maps) {
		return userDao.selectByrole(maps);
	}

	@Override
	public int forgetPass(String pwd, String loginname) {
		return userDao.forgetPass(pwd, loginname);
	}

	@Override
	public List<String> selectRoleMenu(String roleid) {
		return userDao.selectRoleMenu(roleid);
	}

	@Override
	public String selectLoginNameByPhone(String phone) {
		return userDao.selectLoginNameByPhone(phone);
	}

	@Override
	public List<String> selectLoginNameByRole(List<String> list) {
		return userDao.selectLoginNameByRole(list);
	}

	@Override
	public int boundPhone(String phone, String loginname) {
		return userDao.boundPhone(phone, loginname);
	}

	@Override
	public List<User> selectByCellId(String cellId) {
		return userDao.selectByCellId(cellId);
	}

	
    public int updateByPrimaryKeySelective(User record) {
        return userDao.updateByPrimaryKeySelective(record);
    }
}
